package com.zrrd.learn.chapter08面向对象.pattern.factory;

/**
 * 猫工厂
 *
 * @author wrn
 * @version 1.0
 * @date 2023/8/3 10:31
 */

public class CatFactory {

    public static Cat instanceCat(String type){
        Cat c= new Cat();
        c.setType(type);
        return c;
    }

    public static Cat instanceCatByName(String name){
        Cat c= new Cat();
        c.setName(name);
        return c;
    }

    public static Cat instanceCat(String name,String type){
        Cat c= new Cat();
        c.setType(type);
        c.setName(name);
        return c;
    }

}
